//
//  AFN_Get.m
//  123
//
//  Created by dllo on 15/4/21.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "AFN_Get.h"

@implementation AFN_Get
+(void)netWorkingTool:(NSString *)strURL block:(Block)myBlock{
    //防止中文
    NSString *strURLEncode = [strURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
    [manager GET:strURLEncode parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
        
        myBlock(responseObject);

    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"解析失败");
        NSLog(@"error:%@", error);
    }];
}
@end
